Public Class ExportSelection

    Private Sub btnOkay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOkay.Click

        Dim mode As Integer = 0

        If Me.rbCategories.Checked Then
            mode = 0
        End If

        If Me.rbProducts.Checked Then
            mode = 1
        End If

        If Me.rbUsers.Checked Then
            mode = 2
        End If

        My.Settings.ExportMode = mode
        Me.DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Private Sub ExportSelection_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Select Case My.Settings.ExportMode
            Case 0
                Me.rbCategories.Checked = True
            Case 1
                Me.rbProducts.Checked = True
            Case 2
                Me.rbUsers.Checked = True
            Case Else
                Me.rbCategories.Checked = True
        End Select
    End Sub

End Class